﻿/*
Commerce by Onex – eCommerce software platform (www.ecommerce.byonex.com)
Copyright (C) 2008-2010 by Onex Group

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 */
using System;
using System.Collections.Generic;
using System.Text;

namespace ShopModel
{
    /// <summary>
    /// Klasa przechowująca komentarze dodawane przez użytkowników do strony (Class storing comments added by users )
    /// </summary>
    public class Comment
    {
        #region VARIABLES

        private int idComment;
        private string author;
        private string content;
        private DateTime date;
        decimal rate;
        bool accepted;
        bool hidden;

        #endregion

        #region FIELDS

        public bool Accepted
        {
            get { return accepted; }
            set { accepted = value; }
        }
        public bool Hidden
        {
            get { return hidden; }
            set { hidden = value; }
        }

        public decimal Rate
        {
            get { return rate; }
            set { rate = value; }
        }


        public int IDComment
        {
            get
            {
                return idComment;
            }

            set
            {
                idComment = value;
            }
        }

        public string Author 
        {
            get
            {
                return author;
            }
            set
            {
                author = value;
            }
        }

        public string Content
        {
            get
            {
                return content;
            }

            set
            {
                content = value;
            }
        }

        public DateTime Date
        {
            get
            {
                return date;
            }

            set
            {
                date = value;
            }
        }

        #endregion 

        #region CONSTRUCTORS

        public Comment(int id, string author, string content, DateTime date)
        {
            this.author = author;
            this.content = content;
            this.idComment = id;
            this.date = date;
        }

        public Comment(int id, string author, string content, DateTime date,decimal rate)
        {
            this.author = author;
            this.content = content;
            this.idComment = id;
            this.date = date;
            this.rate = rate;
        }

        public Comment(int id, string author, string content, DateTime date, decimal rate, bool accepted, bool hidden)
        {
            this.author = author;
            this.content = content;
            this.idComment = id;
            this.date = date;
            this.rate = rate;
            this.accepted = accepted;
            this.hidden = hidden;
        }

        #endregion
    }
}
